package com.catfive.jet_work.feature.confeditor

import androidx.compose.foundation.layout.padding
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.sp
import com.catfive.jet_work.core.design.component.TopBarIconMenuButton

@Composable
fun ConfEditorRoute(onOpenDrawer: () -> Unit) {
    ConfEditorScreen(onOpenDrawer = onOpenDrawer)
}

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ConfEditorScreen(onOpenDrawer: () -> Unit) {
    Scaffold(topBar = {
        CenterAlignedTopAppBar(
            colors = TopAppBarDefaults.topAppBarColors(
                containerColor = MaterialTheme.colorScheme.surfaceVariant.copy(0.6f)
            ),
            navigationIcon = {
                TopBarIconMenuButton(onClick = { onOpenDrawer() })
            },
            title = {
                Text("配置编辑", fontSize = 24.sp)
            }
        )
    }
    ) { paddingValue ->
        Surface(modifier = Modifier.padding(paddingValue)) {  }
    }
}